package com.wx.service;

import me.chanjar.weixin.common.exception.WxErrorException;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.result.WxMpUser;

public interface WxUserService {

	/**
	 * 获取微信用户信息
	 * 
	 * @param wxMpService
	 * @param openid
	 * @return
	 * @throws WxErrorException
	 */
	public WxMpUser wxMpUserFromWx(WxMpService wxMpService, String openid) throws WxErrorException;

	/**
	 * 注册用户
	 * 
	 * @param wxMpUser
	 * @throws WxErrorException
	 */
	public boolean subscribe(WxMpService wxMpService, String openid) throws WxErrorException;

	/**
	 * 取消关注
	 * 
	 * @param wxMpUser
	 */
	public boolean unSubscribe(String openid);

}
